/*
 * common_util.h
 *
 *  Created on: 2011-3-31
 *      Author: chenl
 */

#ifndef COMMON_UTIL_H_
#define COMMON_UTIL_H_

#ifndef likely
	#define likely(x)		__builtin_expect(!!(x), 1)
#endif
#ifndef unlikely
	#define unlikely(x)		__builtin_expect(!!(x), 0)
#endif


#define prefetch(x) 		__builtin_prefetch(x)
#define prefetchw(x) 		__builtin_prefetch(x,1)

#endif /* COMMON_UTIL_H_ */
